{% extends  'partials/base.html' %}
{%  block title %}订单信息 {% endblock%}
{% load crispy_forms_tags %}
{% block content %}
{% include 'partials/topside.html' %}
<div class="row my-4">
    <div class="col-md-4">
    </div>

    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                订单记录
            </div>
            <div class="card-body">
                <table class="table bg-white">
                    <thead class="bg-info text-white">
                    <tr>
                        <th scope="col">需求提交人</th>
                        <th scope="col">商品名</th>
                        <th scope="col">商品类型</th>
                        <th scope="col">数量</th>
                        <!--<th scope="col">操作</th>-->
                    </tr>
                    </thead>
                    <tbody>
                    {% for order in orders %}

                    <tr>
                        <td>{{order.staff.username}}</td>
                        <td>{{order.product.name}}</td>
                        <td>{{order.product.get_category_display}}</td>
                        <td>{{order.order_quantity}}</td>

                        <!--<th scope="row">-->
                            <!--<a class="btn btn-info btn-sm" href="{% url 'dashboard-product-update' order.id %}">编辑</a>-->
                            <!--<a class="btn btn-danger btn-sm"-->
                               <!--href="{% url 'dashboard-product-delete' order.id %}">删除</a>-->
                        <!--</th>-->
                    </tr>

                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>
{% endblock %}
